﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace Kugar.Core.PluginFramework
{
    public interface IPlugin:IDisposable
    {
        //bool OnCallBefore(string funcName, JObject args);

        ///// <summary>
        ///// 调用函数之后调用该函数
        ///// </summary>
        ///// <param name="result"></param>
        ///// <returns>新的返回值</returns>
        //object OnAfterCall(object result);

        object OnExecuteCoreJson(string funcName, JObject args);

        object OnExecuteCore(string funcName, IReadOnlyDictionary<string, object> args);

        //void OnLoading();

        //void OnLoaded();

        //void OnLoadError(Exception error);

        int Version { get; }

        string PluginName { get; }
    }
}
